package no.spk.util.inforama;

import java.io.File;
import java.util.Properties;
/**
 * @author Marius Breivik - Accenture
 */
public class WebArchive {

	private String archiveVersion = null;
	private String archiveArtifactId = null;
	private String archiveGroupId = null;
	private File archivePath = null;
	private String archiveName = null;
	private Properties archiveProperties = new Properties();
	private boolean isSnapshotVersion = false;
	
	public WebArchive() {}
		
	public boolean isSnapshotVersion() {
		return isSnapshotVersion;
	}



	public void setSnapshotVersion(boolean isSnapshotVersion) {
		this.isSnapshotVersion = isSnapshotVersion;
	}



	public String getArchiveArtifactId() {
		return archiveArtifactId;
	}


	public void setArchiveArtifactId(String archiveArtifactId) {
		this.archiveArtifactId = archiveArtifactId;
	}


	public String getArchiveGroupId() {
		return archiveGroupId;
	}


	public void setArchiveGroupId(String archiveGroupId) {
		this.archiveGroupId = archiveGroupId;
	}


	public String getArchiveName() {
		return archiveName;
	}


	public void setArchiveName(String archiveName) {
		this.archiveName = archiveName;
	}


	public Properties getArchiveProperties() {
		return archiveProperties;
	}

	public void setArchiveProperties(Properties archiveProperties) {
		this.archiveProperties = archiveProperties;
	}

	public String getArchiveVersion() {
		return archiveVersion;
	}

	public void setArchiveVersion(String archiveVersion) {
		this.archiveVersion = archiveVersion;
		if ( archiveVersion.endsWith( "Snapshot" ) || archiveVersion.endsWith( "SNAPSHOT" )) {
			setSnapshotVersion( true );
		}
	}

	public File getArchivePath() {
		return archivePath;
	}

	public void setArchivePath(File archivePath) {
		this.archivePath = archivePath;
	}
	
	public String toString(){
		return "Version: " + archiveVersion + "\nArtifactId: " + archiveArtifactId + "\nGroupId: " + archiveGroupId;
	}
}
